package router

import (
	"getaway/basic/config"
	"getaway/handler/api"
	"getaway/middleware"
	"github.com/gin-gonic/gin"
)

func Vehicle(v1 *gin.RouterGroup) {
	vehicle := v1.Group("/vehicle")
	{
		vehicle.POST("/addVehicle", api.AddVehicle)           //添加车辆
		vehicle.POST("/addRideHailing", api.AddRideHailing)   //网约车添加
		vehicle.POST("/addVehicleFiles", api.AddVehicleFiles) // 车辆证件添加
		vehicle.GET("/getVehicle", api.GetVehicle)            // 车辆展示
		vehicle.POST("/addRouter", api.AddRouter)             //添加线路
		vehicle.POST("/addSite", api.AddSite)                 //添加站点
		vehicle.GET("/getRouter", api.GetRouter)              // 线路展示
		vehicle.POST("/addRideRecord", api.AddRideRecord)     //添加用户乘车
		vehicle.GET("/getFence", api.GetFence)                // 围栏展示
		vehicle.Use(middleware.JWTAuth(config.KEY_JWT))
		vehicle.POST("/addFence", api.AddFence)         //添加围栏
		vehicle.POST("/deletedFence", api.DeletedFence) // 删除围栏
		vehicle.POST("/updateFence", api.UpdateFence)   // 修改围栏
	}
}
